/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package common.UCM;

import common.UCM.UCController;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * Use case to action listener is an adaptor to convert a use case to an action
 * listener. Used when adding use cases to buttons.
 * @author Richard Irons
 */
public class UC2AL implements ActionListener {
    private UCController uc;
    /**
     * Constructor that takes in a uc controller and sets this.uc it
     * @param uc
     */
    public UC2AL(UCController uc) {
        this.uc = uc;
    }
    /**
     * Implment the actionPerformed to do uc.run
     * @param e
     */
    public void actionPerformed(ActionEvent e) {
        uc.run();
    }

}
